import Vue from 'vue'
import VueI18n from 'vue-i18n'

Vue.use(VueI18n)

import elementCN from 'element-ui/lib/locale/lang/zh-CN'
import elementEN from 'element-ui/lib/locale/lang/en'
import crunnZH from './zh'
import crunnEN from './en'
import Cookie from 'js-cookie'
export default new VueI18n({
  locale: Cookie.get('language') || 'en',
  messages: {
    zh: {
      morning: '早上好',
      ...elementCN,
      ...crunnZH
    },
    en: {
      morning: 'good morning',
      ...elementEN,
      ...crunnEN
    }
  }

})
